<script setup>
import "@material/web/button/text-button";
import Dialog from "@/components/MaterialDialog.vue";

const props = defineProps(["certificate"]);
const emit = defineEmits(["close"]);
</script>

<template>
  <Dialog :open="props.certificate != null" @close="$emit('close')">
    <template #headline>
      设备证书
    </template>

    <template #content>
      <form id="device-certificate-form" method="dialog" v-if="props.certificate != null">
        <pre>{{ props.certificate }}</pre>
      </form>
    </template>

    <template #actions>
      <md-text-button type="submit" form="device-certificate-form">确定</md-text-button>
    </template>
  </Dialog>
</template>